<%@page import="com.etc.zzsys.entity.User"%>
<%@page import="java.util.List"%>
<%@ page language="java" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">

<title>Dashboard Template for Bootstrap</title>

<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="css/dashboard.css" rel="stylesheet">

</head>

<body>

	<nav class="navbar navbar-inverse navbar-fixed-top">
		<div class="container-fluid">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed"
					data-toggle="collapse" data-target="#navbar" aria-expanded="false"
					aria-controls="navbar">
					<span class="sr-only">Toggle navigation</span> <span
						class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="#">问答系统后台</a>
			</div>
			<div id="navbar" class="navbar-collapse collapse">
				<ul class="nav navbar-nav navbar-right">
					<li><a href="#">仪表盘</a></li>
					<li><a href="#">设置</a></li>

					<li><a href="#">帮助</a></li>
				</ul>
				<form class="navbar-form navbar-right">
					<input type="text" class="form-control" placeholder="搜搜...">
				</form>
			</div>
		</div>
	</nav>

	<div class="container-fluid">
		<div class="row">
			<div class="col-sm-3 col-md-2 sidebar">
				<ul class="nav nav-sidebar">
					<li><a href="index.jsp">首页<span class="sr-only">(current)</span></a>
					</li>
					<li><a href="Userservlet?op=list">用户列表</a></li>
					<li><a href="addUsers.jsp">新增用户</a></li>
					<li><a href="#">Export</a></li>
				</ul>
				<ul class="nav nav-sidebar">
					<li><a href="qs?op=querylist">问题列表</a></li>
					<li class="active"><a href="qs?op=add">提出问题</a></li>
					<li><a href="">One more nav</a></li>
					<li><a href="">Another nav item</a></li>
					<li><a href="">More navigation</a></li>
				</ul>
				<ul class="nav nav-sidebar">
					<li><a href="as.do?op=query">答案管理</a></li>
					<li><a href="">One more nav</a></li>
					<li><a href="">Another nav item</a></li>
				</ul>
			</div>
			<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
				<h2 class="sub-header">提出问题</h2>

				<!-- 表单开始 -->
				<form class="form-horizontal" role="form" action="qs?op=doAdd"
					method="post">
					<div class="form-group">
						<label for="" class="col-sm-2 control-label">标题</label>
						<div class="col-sm-8">
							<input type="text" required="required" class="form-control"
								name="title" id="" />
						</div>
					</div>
					<div class="form-group">
						<label for="" class="col-sm-2 control-label">内容</label>
						<div class="col-sm-6">
							<textarea name="content" required="required" rows="12"
								class="form-control"></textarea>
						</div>
					</div>

					<div class="form-group">
						<label for="" class="col-sm-2 control-label">用户名</label>
						<div class="col-sm-2">
							<select class="form-control" name="userId">
								<option>请选择</option>
								<%
									List<User> ulist = (List<User>) request.getAttribute("ulist");
									for (User u : ulist) {
								%>
								<option value="<%=u.getUserId()%>"><%=u.getUserName()%></option>
								<%
									}
								%>
							</select>
						</div>
					</div>


					<div class="form-group">
						<div class="col-sm-offset-2 col-sm-10">
							<button type="submit" class="btn btn-danger">提交</button>
						</div>
					</div>
				</form>
				<!-- 表单结束 -->

			</div>
		</div>
	</div>

	<!-- Bootstrap core JavaScript
    ================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->
	<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
	<script src="js/bootstrap.min.js"></script>

</body>

</html>